package 第二题;

/**
 * ClassName: Employee
 * Package: 第二题
 * Description:定义并测试一个代表员工的Employee类。员工属性包括“编号“姓名“基本薪水”和“薪水增长额”，还包括计算薪水增长额及计算增长后的工资总额的操作方法
 *
 * @Author fjorid
 * @Create 2025/1/11 20:37
 * @Version 1.0
 */
public class Employee {
    public static void main(String[] args) {
        Employee employee = new Employee();
        System.out.println(employee.totalsalay());

    }
    int id ;
    int basiCsalary = 5000;
    String name;


    //薪水增长额为工资的5%
    public  int salaryIncrement(){
      return (int) ((int)basiCsalary*0.05);
    }
    //总工资为基本薪水加上薪水增长额
    public int totalsalay(){
        return basiCsalary+salaryIncrement();
    }
}
